Skip to content

[Test] Refine backward compat test on API version change #5276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aylei
Copy link
Collaborator

@aylei aylei commented Apr 18, 2025

Follow up: #5255
close: #5277

Currently if API version is bumped, there would be an test failure which is expected: https://buildkite.com/skypilot-1/quicktest-core/builds/282#0196423d-94af-4954-b514-2bfb3d4f925f

This PR change the status to success in this case to avoid confusions.

Tested (run the relevant ones):

  • Code formatting: install pre-commit (auto-check on commit) or bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: /smoke-test (CI) or pytest tests/test_smoke.py (local)
  • Relevant individual tests: /smoke-test -k test_name (CI) or pytest tests/test_smoke.py::test_name (local)
  • Backward compatibility: /quicktest-core (CI) or pytest tests/smoke_tests/test_backward_compat.py (local)

@aylei aylei changed the title Refine backward compat test on API version change [Test] Refine backward compat test on API version change Apr 18, 2025
@aylei
Copy link
Collaborator Author

aylei commented Apr 18, 2025

/quicktest-core

Signed-off-by: Aylei <[email protected]>
@aylei
Copy link
Collaborator Author

aylei commented Apr 18, 2025

/quicktest-core

Signed-off-by: Aylei <[email protected]>
@aylei
Copy link
Collaborator Author

aylei commented Apr 18, 2025

/quicktest-core

@aylei
Copy link
Collaborator Author

aylei commented Apr 18, 2025

/quicktest-core

https://buildkite.com/skypilot-1/quicktest-core/builds/288#01964875-d63a-4d71-a298-aaad84dc7f84

can be successfully skipped when version bump

@aylei
Copy link
Collaborator Author

aylei commented Apr 18, 2025

/quicktest-core

https://buildkite.com/skypilot-1/quicktest-core/builds/289#019648a5-f70b-44d9-b3b3-54db99196bc8

Compatibility is checked when API version is not changed

@aylei aylei requested a review from zpoint April 18, 2025 15:02
# Check API version compatibility
# If API version is bumped, the in-compatibility is expected
# and we just skip the test.
skip_if = (
Copy link
Collaborator

@zpoint zpoint Apr 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if we actually need to introduce the skip_if parameter. It's not a straightforward boolean parameter, and you'd need to read the source code to understand how skip_if behaves.

An alternative could be

# pesudo code
BASE_SERVER_VERSION = subprocess.popen('self.ACTIVATE_BASE && python -c "print(sky.__server_version__)"')
CURRENT_CLIENT_VERSION=subprocess.popen('{self.ACTIVATE_CURRENT} && python -c "print(sky.__client_version__)"'')
if mismatch(BASE_SERVER_VERSION, CURRENT_CLIENT_VERSION):
    pytest.skip()

...
self.run_compatibility_test(cluster_name,
                                    commands,
                                    teardown)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about make skip_if a callable that returns boolean? I was intended to use a sky command to check compatibility so that the implementation details of compatibility can be kept in a blackbox for smoke test

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that sounds better that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Test] Skip client-server compatibility test if API version is bumped
2 participants